package com.castle.fortress.admin.goods.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.castle.fortress.admin.goods.entity.GoodsCategoryEntity;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;
/**
 * 商品分类表Mapper 接口
 *
 * @author majunjie
 * @since 2021-11-22
 */
public interface GoodsCategoryMapper extends BaseMapper<GoodsCategoryEntity> {

    /**
    * 扩展信息列表
    * @param pageMap
    * @param goodsCategoryEntity
    * @return
    */
    List<GoodsCategoryEntity> extendsList(@Param("map")Map<String, Long> pageMap, @Param("goodsCategoryEntity") GoodsCategoryEntity goodsCategoryEntity);

    /**
    * 扩展信息记录总数
    * @param goodsCategoryEntity
    * @return
    */
    Long extendsCount(@Param("goodsCategoryEntity") GoodsCategoryEntity goodsCategoryEntity);

    /**
    * 商品分类表扩展详情
    * @param id 商品分类表id
    * @return
    */
    GoodsCategoryEntity getByIdExtends(@Param("id")Long id);

    /**
     * 移除分类的上级id
     * @param id
     */
    void deletePidById(Long id);
}

